package com.hzqy.persistence.dao.statistics;

import java.util.List;
import java.util.Map;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Repository;

import com.hzqy.persistence.dao.core.PersistenceDao;
import com.hzqy.web.vo.PmsUserVo;
import com.hzqy.web.vo.StatDataListenAllVo;
import com.hzqy.web.vo.StatDataListenTop20Vo;
import com.hzqy.web.vo.StatDataListenVo;
import com.hzqy.web.vo.StatDataOneVideoRecordVo;
import com.hzqy.web.vo.statistics.UserListenHistoryVo;
import com.hzqy.web.vo.statistics.user_video_demand.UserVideoDemandVo;

@Repository
public class ListenDao extends PersistenceDao<PmsUserVo, Integer>{
	protected final Logger LOG = LoggerFactory.getLogger(ListenDao.class);

	public int selectListenCount(StatDataListenVo statDataListenVo){
		return getSqlSession().selectOne(this.getNamespace()+"selectListenCount",statDataListenVo);
	}
	
	public List<StatDataListenVo> selectListenList(Map<String,Object> map){
		String namespace = this.getNamespace();
		return getSqlSession().selectList(namespace + "selectListenList", map);
	}
	
	public List<StatDataListenVo> selectListenExcelList(Map<String,Object> map){
		String namespace = this.getNamespace();
		return getSqlSession().selectList(namespace + "selectListenExcelList", map);
	}
	
	public int selectListenTop20Count(StatDataListenTop20Vo statDataListenTop20Vo){
		return getSqlSession().selectOne(this.getNamespace()+"selectListenTop20Count",statDataListenTop20Vo);
	}
	
	public List<StatDataListenTop20Vo> selectListenTop20List(Map<String,Object> map){
		String namespace = this.getNamespace();
		return getSqlSession().selectList(namespace + "selectListenTop20List", map);
	}
	
	public List<StatDataListenTop20Vo> selectListenTop20ExcelList(Map<String,Object> map){
		String namespace = this.getNamespace();
		return getSqlSession().selectList(namespace + "selectListenTop20ExcelList", map);
	}

	public List<StatDataListenAllVo> selectListenAllList(Map<String, Object> map) {
		String namespace = this.getNamespace();
		return getSqlSession().selectList(namespace + "selectListenAllList", map);
	}

	public int selectListenAllCount(StatDataListenAllVo statDataListenAllVo) {
		return getSqlSession().selectOne(this.getNamespace()+"selectListenAllCount",statDataListenAllVo);
	}

	public List<StatDataListenAllVo> selectListenAllExcelList(Map<String, Object> map) {
		String namespace = this.getNamespace();
		return getSqlSession().selectList(namespace + "selectListenAllExcelList", map);
	}
	
	public int selectListenHistoryCount(Map<String, Object> map) {
		return getSqlSession().selectOne(this.getNamespace()+"selectListenHistoryCount",map);
	}
	
	public List<UserListenHistoryVo> selectListenHistoryList(Map<String, Object> map) {
		String namespace = this.getNamespace();
		return getSqlSession().selectList(namespace + "selectListenHistoryList", map);
	}
	
	public List<UserListenHistoryVo> selectListenHistoryExcelList(Map<String, Object> map) {
		String namespace = this.getNamespace();
		return getSqlSession().selectList(namespace + "selectListenHistoryExcelList", map);
	}
	
	/**
	 * 根据条件统计查询数量
	 * @param map
	 * @return
	 */
	public int selectListenHistoryByStatisticalDimensionCount(Map<String, Object> map) {
		return getSqlSession().selectOne(this.getNamespace()+"selectListenHistoryByStatisticalDimensionCount",map);
	}
	/**
	 * 根据条件统计查询数据
	 * @param map
	 * @return
	 */
	public List<UserVideoDemandVo> selectListenHistoryByStatisticalDimensionList(Map<String, Object> map) {
		String namespace = this.getNamespace();
		return getSqlSession().selectList(namespace + "selectListenHistoryByStatisticalDimensionList", map);
	}
	/**
	 * 根据条件统计查询所有数据
	 * @param map
	 * @return
	 */
	public List<UserVideoDemandVo> selectListenHistoryByStatisticalDimensionExcelList(Map<String, Object> map) {
		String namespace = this.getNamespace();
		return getSqlSession().selectList(namespace + "selectListenHistoryByStatisticalDimensionExcelList", map);
	}
	
	/**
	 * 根据视频名称统计查询数量
	 * @param map
	 * @return
	 */
	public int selectListenHistoryByViewCount(Map<String, Object> map) {
		return getSqlSession().selectOne(this.getNamespace()+"selectListenHistoryByViewCount",map);
	}
	/**
	 * 根据视频名称统计查询数据
	 * @param map
	 * @return
	 */
	public List<UserListenHistoryVo> selectListenHistoryByViewList(Map<String, Object> map) {
		String namespace = this.getNamespace();
		return getSqlSession().selectList(namespace + "selectListenHistoryByViewList", map);
	}
	/**
	 * 根据视频名称统计查询所有数据
	 * @param map
	 * @return
	 */
	public List<UserListenHistoryVo> selectListenHistoryByViewExcelList(Map<String, Object> map) {
		String namespace = this.getNamespace();
		return getSqlSession().selectList(namespace + "selectListenHistoryByViewExcelList", map);
	}
	
	/**
	 * 视频播放考核查询数量
	 * @param map
	 * @return
	 */
	public int selectVideoPlayAssessmentCount(Map<String, Object> map) {
		return getSqlSession().selectOne(this.getNamespace()+"selectVideoPlayAssessmentCount",map);
	}
	/**
	 * 视频播放考核查询统计
	 * @param map
	 * @return
	 */
	public List<UserVideoDemandVo> selectVideoPlayAssessmentList(Map<String, Object> map) {
		String namespace = this.getNamespace();
		return getSqlSession().selectList(namespace + "selectVideoPlayAssessmentList", map);
	}
	/**
	 * 视频播放考核查询统计并对所有数据导出
	 * @param map
	 * @return
	 */
	public List<UserVideoDemandVo> selectVideoPlayAssessmentExcelList(Map<String, Object> map) {
		String namespace = this.getNamespace();
		return getSqlSession().selectList(namespace + "selectVideoPlayAssessmentExcelList", map);
	}
	
	public int selectVideoRecordCount(StatDataOneVideoRecordVo statDataOneVideoRecordVo) {
		return getSqlSession().selectOne(this.getNamespace()+"selectVideoRecordCount",statDataOneVideoRecordVo);
	}

	public List<StatDataOneVideoRecordVo> selectVideoRecordList(Map<String, Object> map) {
		return getSqlSession().selectList(this.getNamespace()+"selectVideoRecordList",map);
		
	}

	public List<StatDataOneVideoRecordVo> selsecVideoRecordAllExceList(Map<String, Object> map) {
		return getSqlSession().selectList(this.getNamespace()+"selsecVideoRecordAllExceList",map);
	}

	
}
